package hotel.compare.oversea.service;

import hotel.base.oversea.entity.MtHotelRoomVo;
import hotel.base.oversea.entity.master.CompareHotelBasicRoom;
import hotel.base.oversea.service.BaseService;
import hotel.base.oversea.utils.Result;
import hotel.compare.oversea.vo.CompareHotelRoomVo;
import hotel.compare.oversea.vo.GetRoomListVO;
import org.apache.ibatis.annotations.Param;

/**
 * 校验房型信息
 * @Author lmf
 * @Date 2020/5/29 13:55
 **/
public interface CompareHotelRoomService extends BaseService<CompareHotelBasicRoom> {
    /**
     * 校验酒店房型信息
     * @return
     */
    Result<Object> compareHotelRoom();

    /**
     * 获取校验后的酒店信息
     * @return
     */
    Result<Object> getCompareHotelRoomList();



    /**
     * 效验酒店房型信息 根据子酒店进行效验
     * @return
     */
    Result<Object> compareHotelRoomBySub();

    /**
     * 获取美团id
     * @param masterHotelId
     * @param roomId
     * @return
     */
    Result<MtHotelRoomVo> getCompareHotelInfo(@Param("masterHotelId") Integer masterHotelId, @Param("roomId") Integer roomId);

    /**
     * 初始化数据
     */
    void initData();
    /**
     * 校验酒店房型信息 根据已经创建过得子酒店id
     * @return
     */
    Result<Object>  getCanCreateSubHotel();

    /**
     * @author: lmf
     * @date: 2020/8/13 15:13
     * 调试接口 优化房型效验
     */
    Result<Object> adjust();
    /**
     * @author: lmf
     * @date: 2020/9/16 11:36
     * 获取成功匹配的房型列表
     */
    Result<Object> getRoomList(GetRoomListVO getRoomListVO);
    /**
     * @author: lmf
     * @date: 2020/9/16 14:32
     * 获取未匹配成功的房型列表
     */
    Result<Object> getNoCompareRoomList(GetRoomListVO getRoomListVO);
    /**
     * @author: lmf
     * @date: 2020/9/16 15:10
     * 获取美团的房型列表
     */
    Result<Object> getMtNoCompareList(Integer masterHotelId);
    /**
     * @author: lmf
     * @date: 2020/9/16 20:44
     * 匹配房型成功
     */
    Result<Object> matchSuccess(CompareHotelRoomVo compareHotelRoomVo);

    /***
     * @Author: lmf
     * @Date: 2020/9/28
     * 通过sql语句来进行匹配
     */
    Result<Object> compareHotelBySql();
    /***
     * @Author: lmf
     * @Date: 2020/9/28
     * 通过指定酒店sql语句来进行匹配
     */
    Result<Object> compareHotelRoomByHotelIdSql(Integer mtHotelId);


    /**
     * 根据vo获取对应携程-美团酒店下的房型
     * @param compareHotelRoomVo
     * @return
     */
    Result<Object> compareHotelRoomInfoByApi(CompareHotelRoomVo compareHotelRoomVo);


    /***
     * 根据所有上架携程-美团酒店下的房型
     */
    Result<Object> compareHotelRoomInfoByAllUpHotel();

    /***
    * @Author: lmf
    * @Date: 2021/1/13
     * 检查匹配的房型是否有映射数据
    */
    Result<Object> checkHotelIsCreateData();
    /***
    * @Author: lmf
    * @Date: 2021/1/20
     * 获取携程的房型数据
    */
    Result<Object> compareRoomList(Integer id, Integer hotelId);
    /***
    * @Author: lmf
    * @Date: 2021/1/21
     * 初步匹配成功，二次验证提交
    */
    Result<Object> compareSuccess(CompareHotelRoomVo compareHotelRoomVo);
    /***
    * @Author: lmf
    * @Date: 2021/1/22
     * 最终匹配入库，进行创建
    */
    Result<Object> finshCompre(CompareHotelRoomVo compareHotelRoomVo);
    /***
    * @Author: lmf
    * @Date: 2021/1/22
     * 数据放回重新匹配
    */
    Result<Object> recompre(CompareHotelRoomVo compareHotelRoomVo);
    /***
    * @Author: lmf
    * @Date: 2021/1/22
     * 提交匹配
    */
    Result<Object> commitCompare(CompareHotelRoomVo compareHotelRoomVo);
    /***
    * @Author: lmf
    * @Date: 2021/1/22
     * 一键提交匹配
    */
    Result<Object> allCompare(GetRoomListVO getRoomListVO);
    /***
    * @Author: lmf
    * @Date: 2021/2/3
     * 根据携程的酒店id+房型id
    */
    Result<Object> removeHotelRoomInfoByHotelIdAndRoomId(int hotelId, int masterBaiscRoomId);
}
